/*
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
package org.xwiki.localization.macro;

import java.util.Locale;

import org.xwiki.properties.annotation.PropertyDescription;
import org.xwiki.properties.annotation.PropertyMandatory;

/**
 * Parameters for the translation macro.
 * 
 * @version $Id$
 * @since 4.3M2
 */
public class TranslationMacroParameters
{
    /**
     * @see #getKey()
     */
    private String key;

    /**
     * @see #getLocale()
     */
    private Locale locale;

    /**
     * @see #getParameters()
     */
    private String[] parameters;

    /**
     * @return the key associated to the translation
     */
    @PropertyDescription("the key associated to the translation")
    @PropertyMandatory
    public String getKey()
    {
        return this.key;
    }

    /**
     * @param key the key associated to the translation
     */
    public void setKey(String key)
    {
        this.key = key;
    }

    /**
     * @return the locale in which to resolve the translation
     */
    public Locale getLocale()
    {
        return this.locale;
    }

    /**
     * @param locale the locale in which to resolve the translation
     */
    @PropertyDescription("the locale in which to resolve the translation. Current one is used if not set.")
    public void setLocale(Locale locale)
    {
        this.locale = locale;
    }

    /**
     * @return the translation parameters
     */
    public String[] getParameters()
    {
        return this.parameters;
    }

    /**
     * @param parameters the translation parameters
     */
    @PropertyDescription("the translation parameters")
    public void setParameters(String[] parameters)
    {
        this.parameters = parameters;
    }
}
